package com.legna.mhxy.support.controller;

import com.legna.mhxy.support.entity.RingCategory;
import com.legna.mhxy.support.service.AnalysisService;
import com.legna.mhxy.support.service.RingCategoryService;
import com.legna.mhxy.support.utils.Result;
import com.legna.mhxy.support.vo.UserRingVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Tag(name="环种类")
@RestController
@RequestMapping("/ring/category")
@AllArgsConstructor
public class RingCategoryController {

    private final RingCategoryService ringCategoryService;

    @GetMapping
    @Operation(summary = "环种类查询")
    public Result<List<RingCategory>> listAll(@RequestParam("types") List<Integer> types) {
        List<RingCategory> ringCategories = ringCategoryService.listAll(types);
        return Result.ok(ringCategories);
    }
}
